<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>浮动原理</title>
<style>
	#box1{ width:300px; height:100px; background:red; }
	#box2{ background:green; float:left; color:white; }
</style>
</head>
<body>
<div id="box1">
	<div id="box2">这是一个浮动的元素</div>	
</div>
</body>
</body>
</html>




